package com.kaikeba.service;

import com.kaikeba.dao.BaseAdminDao;
import com.kaikeba.dao.impl.AdminDaoMysql;

import java.util.Date;

/**
 * @description:
 * @author: ManolinCoder
 * @time: 2021/8/29
 */
public class AdminService {
    private static BaseAdminDao baseAdminDao = new AdminDaoMysql();
    /**
     * @Author LC
     * @Description //TODO 更新登录时间与ip
     * @Date 14:42 2021/8/29
     * @Param [username, date, ip]
     * @return void
     **/
    public static void updateLoginTimeAndIP(String username, Date date,String ip){
        baseAdminDao.updateLoginTime(username,date,ip);
    }

    /**
     * @Author LC
     * @Description //TODO 登录
     * @Date 14:43 2021/8/29
     * @Param [username, password]
     * @return boolean true表示成功,false表示失败
     **/
    public static boolean login(String username,String password){
        return baseAdminDao.login(username,password);
    }
}
